[reciterId]-2ddbc01b90393fc8.js 17 KB

12
  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[18833],{39659:function(e,n,t){"use strict";var r,i,a=t(67597);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(null,arguments)}n.Z=function(e){return a.createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=a.createElement("path",{d:"M10 13a5.001 5.001 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),i||(i=a.createElement("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))}},46031:function(e,n,t){"use strict";var r,i=t(67597);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a.apply(null,arguments)}n.Z=function(e){return i.createElement("svg",a({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M7.5 1.05a.45.45 0 0 1 .45.45v6.914l2.232-2.232a.45.45 0 1 1 .636.636l-3 3a.45.45 0 0 1-.636 0l-3-3a.45.45 0 1 1 .636-.636L7.05 8.414V1.5a.45.45 0 0 1 .45-.45ZM2.5 10a.5.5 0 0 1 .5.5V12c0 .554.446 1 .996 1h7.005A.999.999 0 0 0 12 12v-1.5a.5.5 0 0 1 1 0V12c0 1.104-.894 2-1.999 2H3.996A1.997 1.997 0 0 1 2 12v-1.5a.5.5 0 0 1 .5-.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})))}},68414:function(e,n,t){"use strict";var r,i=t(67597);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a.apply(null,arguments)}n.Z=function(e){return i.createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M5 20h4.571V4H5v16Zm9.143-16v16h4.571V4h-4.571Z",fill:"currentColor"})))}},71714:function(e,n,t){"use strict";var r,i=t(67597);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a.apply(null,arguments)}n.Z=function(e){return i.createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M4 2v20.364l16-10.182L4 2Z",fill:"currentColor"})))}},49127:function(e){function n(){return new DOMException("The request is not allowed","NotAllowedError")}e.exports=async function(e){try{await async function(e){if(!navigator.clipboard)throw n();return navigator.clipboard.writeText(e)}(e)}catch(t){try{await async function(e){const t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",t.style.webkitUserSelect="auto",t.style.userSelect="all",document.body.appendChild(t);const r=window.getSelection(),i=window.document.createRange();r.removeAllRanges(),i.selectNode(t),r.addRange(i);let a=!1;try{a=window.document.execCommand("copy")}finally{r.removeAllRanges(),window.document.body.removeChild(t)}if(!a)throw n()}(e)}catch(r){throw r||t||n()}}}},62506:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reciters/[reciterId]",function(){return t(93251)}])},84620:function(e,n,t){"use strict";t.d(n,{L:function(){return _}});var r=t(69976),i=t(57611),a=t(67597),o=t(21594),c=t(61395),s=t(648),l=t(18356),u=t(10117),d=t(46031),p=t(33294),f=t(12195),h=t(82427),_=function(e,n){var t=e.substring(e.lastIndexOf("/")+1).split("?"),i=(0,r.Z)(t,1)[0],a=new XMLHttpRequest;a.responseType="blob",a.onload=function(){var e=document.createElement("a");e.href=window.URL.createObjectURL(a.response),e.download=i,e.style.display="none",document.body.appendChild(e),e.click(),n()},a.open("GET",e),a.send()};n.Z=function(){var e=(0,c.Z)("common").t,n=(0,a.useContext)(h.c),t=(0,o.v)(n,(function(e){return e.context.audioData.audioUrl})),r=(0,s.v9)(p.iL),m=(0,s.I0)();return(0,i.jsx)(l.Z.Item,{onClick:function(){(0,f.MY)("audio_player_download"),m((0,p.f3)(!0)),_(t,(function(){m((0,p.f3)(!1))}))},icon:r?(0,i.jsx)(u.Z,{size:u.E.Large}):(0,i.jsx)(d.Z,{}),children:e("audio.player.download")})}},21648:function(e,n,t){"use strict";var r=t(57044),i=t(16946),a=t(96151),o=t(57611),c=(t(67597),t(41801)),s=t(48842);n.Z=function(e){var n=e.url,t=e.image,l=e.imageAlt,u=e.imageHeight,d=e.imageWidth,p=e.openGraph,f=e.description,h=(0,a.Z)(e,["url","image","imageAlt","imageHeight","imageWidth","openGraph","description"]),_=(0,r.Z)({},p&&{openGraph:p},n&&{url:n},t&&{images:[{url:t,width:d,height:u,alt:l}]}),m=(0,r.Z)({},h,f&&{description:(0,s.aS)(f,150)});return(0,o.jsx)(c.PB,(0,i.Z)((0,r.Z)({},m),{openGraph:_}))}},73645:function(e,n,t){"use strict";t.d(n,{_:function(){return r},Z:function(){return d}});var r,i=t(45361),a=t(57611),o=(t(67597),t(37014)),c=t.n(o),s=t(42985),l=t.n(s),u=function(e){var n=e.id;return(0,a.jsx)("span",{translate:"no",children:n.padStart(3,"0")})};!function(e){e.Small="small",e.Medium="medium",e.Large="large",e.Mega="mega"}(r||(r={}));var d=function(e){var n,t=e.chapterId,o=e.size,s=void 0===o?r.Medium:o,d=e.hasSurahPrefix,p=void 0===d||d;return(0,a.jsxs)("span",{className:c()(l().iconContainer,(n={},(0,i.Z)(n,l().iconContainerSmall,s===r.Small),(0,i.Z)(n,l().iconContainerLarge,s===r.Large),(0,i.Z)(n,l().iconContainerMega,s===r.Mega),n)),children:[(0,a.jsx)(u,{id:t}),p&&(0,a.jsx)(u,{id:"surah"})]})}},56539:function(e,n,t){"use strict";t.d(n,{Jf:function(){return a},fz:function(){return r}});var r,i,a,o=t(45361),c=t(57044),s=t(57611),l=t(67597),u=t(37014),d=t.n(u),p=t(85494),f=t(90724),h=t.n(f),_=t(43172);!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(r||(r={})),function(e){e.Error="error",e.Warning="warning",e.Success="success"}(i||(i={})),function(e){e.Default="default",e.Main="main"}(a||(a={}));n.ZP=function(e){var n=e.id,t=e.name,u=e.label,f=e.placeholder,m=e.size,v=void 0===m?r.Medium:m,g=e.fixedWidth,x=void 0===g||g,C=e.disabled,I=void 0!==C&&C,j=e.clearable,w=void 0!==j&&j,y=e.type,Z=e.variant,N=e.prefix,L=e.suffix,b=e.onClearClicked,S=e.onChange,E=e.onKeyDown,P=e.inputMode,R=e.value,M=void 0===R?"":R,k=e.shouldFlipOnRTL,O=void 0===k||k,T=e.containerClassName,W=e.htmlType,A=e.isRequired,B=e.inputRef,z=(0,l.useState)(M),Y=z[0],G=z[1];(0,l.useEffect)((function(){G(M)}),[M]);var q,K;return(0,s.jsxs)(s.Fragment,{children:[u&&(0,s.jsx)("p",{className:h().label,children:u}),(0,s.jsxs)("div",{className:d()(h().container,T,(q={},(0,o.Z)(q,h().smallContainer,v===r.Small),(0,o.Z)(q,h().mediumContainer,v===r.Medium),(0,o.Z)(q,h().largeContainer,v===r.Large),(0,o.Z)(q,h().fixedWidth,x),(0,o.Z)(q,h().disabled,I),(0,o.Z)(q,h().error,y===i.Error),(0,o.Z)(q,h().success,y===i.Success),(0,o.Z)(q,h().warning,y===i.Warning),(0,o.Z)(q,h().main,Z===a.Main),q)),children:[N&&(0,s.jsx)("div",{className:d()(h().prefix,h().prefixSuffixContainer),children:N}),(0,s.jsx)("input",(0,c.Z)({className:d()(h().input,(K={},(0,o.Z)(K,h().error,y===i.Error),(0,o.Z)(K,h().success,y===i.Success),(0,o.Z)(K,h().warning,y===i.Warning),(0,o.Z)(K,h().rtlInput,O),K)),type:W,required:A,dir:"auto",id:n,ref:B,disabled:I,onChange:function(e){var n=e.target.value;G(n),S&&S(n)},value:Y,onKeyDown:E,inputMode:P},f&&{placeholder:f},t&&{name:t})),w?(0,s.jsx)(s.Fragment,{children:Y&&(0,s.jsx)("div",{className:h().clearContainer,children:(0,s.jsx)(p.ZP,{shape:p.jL.Circle,variant:p.Wu.Ghost,size:p.qE.Small,onClick:b,children:(0,s.jsx)(_.Z,{})})})}):(0,s.jsx)(s.Fragment,{children:L&&(0,s.jsx)("div",{className:d()(h().suffix,h().prefixSuffixContainer),children:L})})]})]})}},93251:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return U},default:function(){return X}});var r=t(57044),i=t(69976),a=t(57611),o=t(67597),c=t(37014),s=t.n(c),l=t(19418),u=t(61395),d=t(86719),p=t.n(d),f=t(10348),h=t.n(f),_=t(21648),m=t(1997),v=t(51726),g=t(21594),x=t(49127),C=t.n(x),I=t(84620),j=t(73645),w=t(85494),y=t(10117),Z=t(85609),N=t(18569),L=t.n(N),b=t(39659),S=t(46031),E=t(68414),P=t(71714),R=t(12195),M=t(84020),k=t(66634),O=t(87739),T=t(82427),W=function(e){var n=e.filteredChapters,t=e.selectedReciter,r=(0,Z.useToast)(),i=(0,u.Z)(),c=i.t,l=i.lang,d=(0,o.useContext)(T.c),p=(0,g.v)(d,(function(e){return e.context.surah})),f=(0,g.v)(d,(function(e){var n;return null===(n=e.context.audioData)||void 0===n?void 0:n.reciterId})),h=(0,g.v)(d,(function(e){return e.matches("VISIBLE.AUDIO_PLAYER_INITIATED.PLAYING")})),_=(0,o.useState)(null),x=_[0],N=_[1],W=function(){var e=(0,m.Z)((function(e){var n;return(0,v.__generator)(this,(function(r){switch(r.label){case 0:return(0,R.MY)("reciter_page_chapter_audio_download"),[4,(0,O.lt)(Number(t.id),Number(e))];case 1:return n=r.sent(),N(e),(0,I.L)(n.audioUrl,(function(){N(null)})),[2]}}))}));return function(n){return e.apply(this,arguments)}}();return(0,a.jsxs)("div",{className:L().chapterListContainer,children:[n.map((function(e){var n=h&&p===Number(e.id)&&t.id===f,i=function(){n?d.send("TOGGLE"):function(e){var n=e;(0,R.Kz)("reciter_page_chapter_played",{stationId:n}),d.send({type:"PLAY_SURAH",surah:Number(e),reciterId:t.id})}(e.id.toString())};return(0,a.jsxs)("div",{className:L().chapterListItem,role:"button",tabIndex:0,onKeyPress:i,onClick:i,children:[(0,a.jsxs)("div",{className:L().chapterInfoContainer,children:[(0,a.jsx)("div",{className:L().playIconWrapper,children:n?(0,a.jsx)("span",{className:s()(L().playPauseIcon),children:(0,a.jsx)(E.Z,{})}):(0,a.jsx)("span",{className:s()(L().playPauseIcon,L().playIcon),children:(0,a.jsx)(P.Z,{})})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:L().chapterName,children:[e.localizedId,". ",e.transliteratedName]}),(0,a.jsx)("span",{className:L().chapterIconContainer,children:(0,a.jsx)(j.Z,{chapterId:e.id.toString(),hasSurahPrefix:!1})})]})]}),(0,a.jsxs)("div",{className:L().actionsContainer,children:[(0,a.jsx)(w.ZP,{variant:w.Wu.Ghost,size:w.qE.Small,shape:w.jL.Circle,onClick:function(n){n.stopPropagation(),function(e){(0,R.MY)("reciter_page_chapter_url_copy");var n=(0,k.Yj)(l),i=(0,M.Y9)(t.id.toString(),e);C()(n+i).then((function(){r(c("common:shared"),{status:Z.ToastStatus.Success})}))}(e.id)},tooltip:c("reciter:copy-link"),ariaLabel:c("reciter:copy-link"),children:(0,a.jsx)(b.Z,{})}),(0,a.jsx)(w.ZP,{shape:w.jL.Circle,variant:w.Wu.Ghost,size:w.qE.Small,onClick:function(){var n=(0,m.Z)((function(n){return(0,v.__generator)(this,(function(t){return n.stopPropagation(),W(e.id),[2]}))}));return function(e){return n.apply(this,arguments)}}(),tooltip:c("common:audio.player.download"),ariaLabel:c("common:audio.player.download"),children:x===e.id?(0,a.jsx)(y.Z,{size:y.E.Small}):(0,a.jsx)(S.Z,{})})]})]},e.id)})),(0,a.jsx)("div",{})]})},A=t(81403),B=t(48086),z=t.n(B),Y=t(44076),G=400,q=function(e,n){return"".concat(e.slice(0,n),"...")},K=function(e){var n,t,r,i=e.selectedReciter,c=(0,u.Z)().t,s=(0,o.useContext)(T.c),l=(0,o.useState)(!0),d=l[0],p=l[1],f=d&&(null===i||void 0===i||null===(n=i.bio)||void 0===n?void 0:n.length)>G?q(null===i||void 0===i?void 0:i.bio,G):null===i||void 0===i?void 0:i.bio;return(0,a.jsxs)("div",{className:z().container,children:[(0,a.jsx)("div",{className:z().reciterImageContainer,children:(0,a.jsx)("img",{className:z().reciterImage,src:(0,Y.Kr)(null===i||void 0===i?void 0:i.profilePicture),alt:null===i||void 0===i||null===(t=i.translatedName)||void 0===t?void 0:t.name})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:z().reciterName,children:null===i||void 0===i||null===(r=i.translatedName)||void 0===r?void 0:r.name}),(0,a.jsxs)("div",{className:z().reciterBio,children:[(0,a.jsx)("span",{dangerouslySetInnerHTML:{__html:f}}),(null===i||void 0===i?void 0:i.bio.length)>G&&(0,a.jsx)("span",{className:z().moreLessButton,role:"button",tabIndex:0,onKeyPress:function(){return p((function(e){return!e}))},onClick:function(){return p((function(e){return!e}))},children:c(d?"common:more":"common:less")})]}),(0,a.jsx)("div",{className:z().actionContainer,children:(0,a.jsx)(w.ZP,{className:z().playButton,prefix:(0,a.jsx)(P.Z,{}),onClick:function(){(0,R.Kz)("reciter_page_play_station"),s.send({type:"PLAY_RADIO",stationId:i.id,stationType:A.T.Reciter})},shouldFlipOnRTL:!1,children:c("radio:play-radio")})})]})]})},D=t(56539),F=t(42366),V=t(18054),H=t(43609),U=!0,X=function(e){var n,t,c=e.selectedReciter,d=e.chaptersData,f=(0,u.Z)(),m=f.t,v=f.lang,g=(0,o.useState)(""),x=g[0],C=g[1],I=(0,o.useMemo)((function(){return Object.entries(d).map((function(e){var n=(0,i.Z)(e,2),t=n[0],a=n[1];return(0,r.Z)({id:t.toString(),localizedId:(0,H.rQ)(Number(t),v)},a)}))}),[d,v]),j=(0,o.useMemo)((function(){return x?function(e,n){var t=new l.Z(e,{keys:["transliteratedName","id","localizedId"],threshold:.3}).search(n),r=t.map((function(e){return e.item}));return t.length||(0,R.Dy)({query:n,source:V.Z.ReciterPageChapterList}),r}(I,x):I}),[x,I]),w=(0,M.aT)(c.id.toString());return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_.Z,{title:null===c||void 0===c||null===(n=c.translatedName)||void 0===n?void 0:n.name,canonical:(0,M.Z2)(v,w),languageAlternates:(0,H.qc)(w),description:m("reciter:reciter-desc",{reciterName:null===c||void 0===c||null===(t=c.translatedName)||void 0===t?void 0:t.name})}),(0,a.jsxs)("div",{className:s()(p().pageContainer),children:[(0,a.jsx)("div",{className:h().reciterInfoContainer,children:(0,a.jsx)("div",{className:s()(p().flowItem,h().headerContainer),children:(0,a.jsx)(K,{selectedReciter:c})})}),(0,a.jsx)("div",{className:s()(p().flowItem,h().searchContainer),children:(0,a.jsx)(D.ZP,{prefix:(0,a.jsx)(F.Z,{}),id:"translations-search",value:x,onChange:C,placeholder:m("reciter:search-chapter"),fixedWidth:!1})}),(0,a.jsx)("div",{className:s()(p().flowItem,h().chaptersListContainer),children:(0,a.jsx)(W,{filteredChapters:j,selectedReciter:c})})]})]})}},44076:function(e,n,t){"use strict";t.d(n,{Kr:function(){return r}});var r=function(e){return"".concat("https://static.qurancdn.com","/").concat(e,"?v=").concat("1")}},48842:function(e,n,t){"use strict";t.d(n,{Nl:function(){return a},aS:function(){return r},ox:function(){return i}});var r=function(e,n){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",r=e.split("",n),i="",a=0;a<r.length;a+=1){var o=r[a];if(i.length===n-1){i="".concat(i).concat(o).concat(t);break}i="".concat(i).concat(o)}return i},i=function(e){return e.replace(/(<([^>]+)>)/gi,"")},a=function(e){if(!e)return"";var n=e.split("-");return 1===n.length?n[0]:n[n.length-1]}},18569:function(e){e.exports={chapterListContainer:"ChapterList_chapterListContainer__l865S",chapterListItem:"ChapterList_chapterListItem__5X02T",playIconWrapper:"ChapterList_playIconWrapper__2ixFV",playPauseIcon:"ChapterList_playPauseIcon__SSudO",playIcon:"ChapterList_playIcon__Kq8TG",chapterName:"ChapterList_chapterName__JQCrd",chapterInfoContainer:"ChapterList_chapterInfoContainer__jljg2",chapterIconContainer:"ChapterList_chapterIconContainer__A8XAf"}},48086:function(e){e.exports={container:"ReciterInfo_container__HegaB",reciterImage:"ReciterInfo_reciterImage__Fq1os",reciterBio:"ReciterInfo_reciterBio__1lJXI",reciterName:"ReciterInfo_reciterName__SiK59",reciterImageContainer:"ReciterInfo_reciterImageContainer__M1Ya0",moreLessButton:"ReciterInfo_moreLessButton__dykBl",actionContainer:"ReciterInfo_actionContainer__YUodQ",playButton:"ReciterInfo_playButton__b9p4W"}},42985:function(e){e.exports={iconContainer:"ChapterIconContainer_iconContainer__5umYV",iconContainerSmall:"ChapterIconContainer_iconContainerSmall__gvmyy",iconContainerLarge:"ChapterIconContainer_iconContainerLarge__z49r_",iconContainerMega:"ChapterIconContainer_iconContainerMega__rKWtt"}},90724:function(e){e.exports={container:"Input_container__5BNOH",fixedWidth:"Input_fixedWidth__MZoNx",disabled:"Input_disabled__AFA4l",error:"Input_error__cfc8q",success:"Input_success__qb_Ue",warning:"Input_warning__KwRSJ",main:"Input_main__K4bVL",input:"Input_input__za7E9",rtlInput:"Input_rtlInput__8Yg1Q",smallContainer:"Input_smallContainer__bxyYT",mediumContainer:"Input_mediumContainer__jEOpT",largeContainer:"Input_largeContainer__yafZ8",label:"Input_label__loZWW",clearContainer:"Input_clearContainer__3LxT4",prefixSuffixContainer:"Input_prefixSuffixContainer__n84F6",prefix:"Input_prefix__jYhnp",suffix:"Input_suffix__v_BvR"}},86719:function(e){e.exports={pageContainer:"index_pageContainer__Pxtn3",loadingContainer:"index_loadingContainer__WEZFc",flow:"index_flow__rCTR5",flowItem:"index_flowItem__GnXWz",additionalVerticalGap:"index_additionalVerticalGap__nzYz6",fullWidth:"index_fullWidth__1n4ux"}},10348:function(e){e.exports={headerContainer:"reciterPage_headerContainer__y7Muj",sectionTitle:"reciterPage_sectionTitle__CCsp1",searchContainer:"reciterPage_searchContainer__DF9Ey",chaptersListContainer:"reciterPage_chaptersListContainer__QTWw_",recitersListContainer:"reciterPage_recitersListContainer__dLjwl",reciterInfoContainer:"reciterPage_reciterInfoContainer__mYOjC"}}},function(e){e.O(0,[19418,49774,92888,40179],(function(){return n=62506,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
  2. //# sourceMappingURL=[reciterId]-2ddbc01b90393fc8.js.map